{extend name="layout/main-block" /}

{block name="style"}
<style>
.row .checkbox{
    padding-left: 20px;
}
.row .checkbox label {
    padding-left: 0;
}
.row .checkbox-inline{
    padding-left: 40px;
}

.row .checkbox label.first-level {
    font-weight: 700;
    font-size: 14px;
}
.row .btn-group-footer{
    margin-top: 10px;
}
</style>
{/block}

<!-- main content start -->
{block name="content"}
<section id="main-content">
    <section class="wrapper">
        <div class="row">
            <ol class="breadcrumb">
                <li class="h4"><a href="">首页</a></li>
                <li class="h4">角色管理</li>
                <li class="h4">配置权限</li>
            </ol>
        </div>
        <div class="row content-main">
            <div class="col-sm-4">              
                {if condition="$role_str eq '' and $rule_str eq ''"}
                <p>暂时没有任何角色和权限</p>             
                {else /}
                <form class="form-horizontal" action="{:url('role_auth',['id'=>$record.role_id])}" method="post">
                    <!-- 分成角色和权限节点两个类型 -->
                    {$role_str}
                    {$rule_str}
                    <div class="form-group">
                        <div class="col-sm-offset-1">
                            <button type="submit" class="btn btn-primary">配 置</button>
                            <a href="{:url('role')}" role='button' class="btn btn-info">返回列表</a>
                        </div>
                    </div>
                </form>
                {/if}
            </div>
        </div>
    </section>
</section>
{/block}

{block name="javascript"}
{/block}